﻿using System.Windows;
using System.Windows.Controls;
using GSSoftSL.Web;

namespace GSSoftSL.Views.NghiepVu
{
    /// <summary>
    /// Description for DiemSoCotDiemView.
    /// </summary>
    public partial class DiemSoCotDiemView : ChildWindow
    {
        private EnumMode _mode = EnumMode.AddNew;

        /// <summary>
        /// Initializes a new instance of the DiemSoCotDiemView class.
        /// </summary>
        public DiemSoCotDiemView()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.Close();
        }

        private void btnOKEdit_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.Close();
        }

        private void btnThoat_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.Close();
        }

        public void SetMode(EnumMode mode)
        {
            _mode = mode;
            if (mode == EnumMode.AddNew)
            {
                btnOK.Visibility = Visibility.Visible;
                btnOKEdit.Visibility = Visibility.Collapsed;
            }
            else
            {
                btnOK.Visibility = Visibility.Collapsed;
                btnOKEdit.Visibility = Visibility.Visible;
            }
        }
    }
}